Skip to content

Instantly share code, notes, and snippets.

@Merott
Merott / tailwind-colors-as-css-variables.md
Last active May 21, 2024 12:21
Expose Tailwind colors as CSS custom properties (variables)

This is a simple Tailwind plugin to expose all of Tailwind's colors, including any custom ones, as custom css properties on the :root element.

There are a couple of main reasons this is helpful:

  • You can reference all of Tailwind's colors—including any custom ones you define—from handwritten CSS code.
  • You can define all of your colors within the Tailwind configuration, and access the final values programmatically, which isn't possible if you did it the other way around: referencing custom CSS variables (defined in CSS code) from your Tailwind config.

See the Tailwind Plugins for more info on plugins.

@marcelopoars
marcelopoars / shortcuts-for-vs-code.md
Last active May 21, 2024 12:18
Alguns atalhos para VS Code que vão ajudar aumentar a sua produtividade e facilitar o seu dia a dia como desenvolvedor.

Atalhos para VS Code

Alguns atalhos para VS Code que vão ajudar aumentar a sua produtividade e facilitar o seu dia a dia como desenvolvedor.

Atalhos básicos

  • Ctrl + = ou Ctrl + - aumentar ou diminuir o zoom
  • Ctrl + 0 resetar o zoom
  • Ctrl + Shift + P mostra todos os comandos disponíveis no VS Code (Ex.: reload, reset, clear)
  • Ctrl + , abre as configurações do VS Code
@phatnguyenuit
phatnguyenuit / how-to-sort-imports-like-a-pro.md
Last active May 21, 2024 12:17
How to sort imports like a pro in TypeScript

How to sort imports like a pro in TypeScript

Crossing reviews becomes a very common activity today in engineering behavior. To help us review changes for pull/merge requests easier, sorting imports can help us a much. The codebase becomes more professional and more consistent, reviewers will be happier, and the review process will be faster, focusing on the implementation changes ONLY.

Have you ever thought about how to sort imports in TypeScript projects automatically?

Let me show you how to archive sorting imports automatically in TypeScript projects with ESLint!

@mjbalcueva
mjbalcueva / password-input.tsx
Last active May 21, 2024 12:14
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {
@kaigouthro
kaigouthro / Pine_Script_5_Mini_Reference.md
Last active May 21, 2024 12:12
A minimal reference to pine script v5

Pine Mini-Reference for more information

Pine Script™ Operators

The following operators are available.

Operator Description
+ Adds two operands
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 21, 2024 12:11
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@nosmall
nosmall / Win_Server_2022_Evaluation_to_full_version.md
Created April 16, 2023 11:11
Upgrade Windows Server 2022 Evaluation (Eval) to Full Version Standard or Datacenter
@fnky
fnky / ANSI.md
Last active May 21, 2024 12:08
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@guiziyu
guiziyu / Bot.py
Last active May 21, 2024 12:07
Elon Musk Twitter Trading Bot
import time
import os, io
import urllib.request
import tweepy
from google.cloud import vision
from google.cloud import vision_v1
import urllib.parse, urllib.request
import hashlib, hmac, time
import requests
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active May 21, 2024 12:06
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4